package cn.kgc.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 课工场
 * @since 2023/9/7
 */

@RestController
@RequestMapping("nacos01")
@Slf4j
public class NacosClient01Controller {

    @Value("${server.port}")
    private String port;

    @Value("${spring.cloud.nacos.discovery.cluster-name}")
    private String position;

    @GetMapping("m1")
    public String method1(){
        log.info("port ={}",port);
        return  position +":"+port+ " 》》NacosClient01 ok ";
    }
}
